<seed-content #content class="gray-background">
  <seed-toolbar-header>
    <seed-toolbar-title>智能课程</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>
  <div class="student-info" *ngIf="curStudent">
    <div class="student-info-left">
      <img class="avatarImg" [src]="curStudent.headPicture||defaultIcon" alt="" (click)="goChildPage()">
      <div class="avatarText">
        <span class="name">{{curStudent?.name}}</span>
        <div class="text">点击头像，查看学员档案</div>
      </div>
    </div>
    <div *ngIf="childList.length>1" class="student-info-right" (click)="switchChild()">切换孩子</div>
  </div>
  <div class="tabs">
    <div class="teach-calendar" (click)="goSchedule()">
      <img [src]="getIcon('teach_calendar.png')" alt="">
      教学日历
    </div>
    <div class="grow-data" (click)="goToGrowUpPage()">
      <img [src]="getIcon('grow_data.png')" alt="">
      身体数据
    </div>
  </div>
  <div class="radar-map-box">
    <div class="train-title">球员能力值</div>
    <div class="timeAndQuest">
      <div class="times">
        <p>最新更新时间</p>
        <span>{{latestDate | date: "yyyy-MM-dd"}}</span>
      </div>
      <div class="quest" (click)="showTips()">？</div>
    </div>
    <div id="radar-map" *ngIf="showChart" echarts [options]="options" (chartInit)="onChartInit($event)"
         [routerLink]="['/train/parent/ability-grow-record',curStudent.id]"></div>
    <div class="tips">点击雷达图查看能力成长记录</div>
  </div>
  <div class="recently-scores"
       [routerLink]="['/train/parent/view-test-scores',curStudent?.id,studentScore?.testDate,studentScore?.testModeId,studentScore?.testMethodId ]" *ngIf="studentScore">
    <div class="rank">{{studentScore?.testScoreLevel}}</div>
    <div class="scores-info" *ngIf="studentScore">
      <div class="scores-item">最近一次测试成绩</div>
      <div class="scores-item">{{studentScore?.testModeName}}</div>
      <div class="scores-item">{{studentScore?.testMethodName}}</div>
      <!--非主观题面-->
      <div class="scores-item" *ngIf="studentScore?.testScoreType===1">测试成绩：{{studentScore?.testScore}}{{studentScore?.testScoreDesc}}</div>
      <!--主观题面-->
      <div class="scores-item" *ngIf="studentScore?.testScoreType===0">测试成绩：{{studentScore?.testScoreLevel}}</div>
    </div>
    <div class="seed-right-arrow"></div>
    <div class="arrow">
      <span>点击查看更多成绩</span>
    </div>
  </div>
  <div class="sign-up-classes">
    <div class="classes-title seed-underline" *ngIf="classes.length>0" (click)="switchClass()">
      <div class="className text-ellipsis">
        {{curClass.className}}
      </div>
      <i class="mark" [class.gray]="curClass.courseStaus===-1 || curClass.courseStaus===0 || curClass.courseStaus===2"
         [class.zong]="curClass.courseStaus===1">
        {{stateObj[curClass.courseStaus]}}
      </i>
      <img class="down-img" [src]="getIcon('icon_training_drop_down.png')" (click)="switchClass()" alt="">
    </div>
    <div class="tabs" *ngIf="classes.length>0 && curClass.courseStaus!==-1">
      <div class="tab" [class.un-read]="unReadCount>0" (click)="checkClassDetail(curClass)">
        <!--<img src="{{getIcon('teach_remark.png')}}" alt="">-->
        <img src="{{getIcon('my_icon_thecoach_new@2x.png')}}" alt="">
        <div>教练点评</div>
      </div>
      <div class="tab" *ngIf="curClass.courseType!==2"
           [routerLink]="['/train/parent/class-plan', curClass.classRoomId]"
           [queryParams]="{className: curClass?.className?curClass?.className:curClass?.coursesName }">
        <!--<img src="{{getIcon('teach_plan.png')}}" alt="">-->
        <img src="{{getIcon('my_icon_plan_new@2x.png')}}" alt="">
        <div>训练大纲</div>
      </div>
      <div class="tab" [routerLink]="['/train/parent/class-teacher', curClass.classRoomId]">
        <!--<img src="{{getIcon('teach_info.png')}}" alt="">-->
        <img src="{{getIcon('my_icon_information_new@2x.png')}}" alt="">
        <div>教练信息</div>
      </div>
      <div class="tab"></div>
    </div>
  </div>
  <div class="hasNoClass" *ngIf="!classes.length || curClass.courseStaus===-1">
    <img src="{{noDataDefaultImg}}" alt="">
    <span>孩子暂未分班，无法查看班级内容</span>
  </div>
  <seed-modal #classList [content]="content">
    <div class="seed-modal-content classListBox" (click)="hideClassModal()">
      <ul class="classList">
        <li class="className seed-underline choose" *ngFor="let classItem of classes"
            [class.choose]="(curClass.classRoomId!==undefined && classItem.classRoomId===curClass.classRoomId) ||
                            (classItem.courseStaus===-1 && classItem.courseId===curClass.courseId)"
            (click)="chooseClass(classItem)">
          <div>
            {{classItem.className?classItem.className:classItem.coursesName}}
            <i class="mark"
               [class.gray]="classItem.courseStaus===-1 || classItem.courseStaus===0 || classItem.courseStaus===2"
               [class.zong]="classItem.courseStaus===1">
              {{stateObj[classItem.courseStaus]}}
            </i>
          </div>
        </li>
      </ul>
    </div>
  </seed-modal>
  <seed-modal #childRenList [content]="content">
    <div class="seed-modal-content childListBox" (click)="hidenModal()">
      <ul class="childList" *ngIf="childList.length>1">
        <li *ngFor="let child of childList" class="seed-underline choose" [class.choose]="child.id===curStudent.id"
            (click)="chooseChild(child)">
          <div class="nameBox">
            <seed-avatar class="childAvatar" [lazyLoadAvatar]="child?.headPicture"></seed-avatar>
            <span class="childName">{{child.name}}</span>
          </div>
        </li>
      </ul>
    </div>
  </seed-modal>
  <seed-modal #tipsContent [content]="content">
    <div class="seed-modal-content tips-text-box">
      <div class="text-content">
        <div class="tips-text">
          能力值呈现了学员对于篮球运动七个最重点维度的当前能力值。姚明篮球俱乐部将会记录学员每一次培训、竞赛、测试的过程表现和结果成绩，通过分析，以最直观的能力值数值，展现给用户，帮助他们了解到，当前学员在各重点技术领域的成绩和进程，知道哪些维度他们做的很好甚至精通，哪些维度他们有待提高还需继续努力。
        </div>
        <div class="Ikown border-top" (click)="closeTips()">我知道了</div>
      </div>
    </div>
  </seed-modal>
</seed-content>
